package com.ztorn.fiscale.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ztorn.common.core.annotation.Excel;
import com.ztorn.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 报关单对象 fiscale_customs_declaration
 *
 * @author ztorn
 * @date 2025-01-19
 */
public class FiscaleCustomsDeclaration extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 报关单ID */
    private Long declarationId;

    /** 报关单号 */
    @Excel(name = "报关单号")
    private String declarationNo;

    /** 预录入编号 */
    @Excel(name = "预录入编号")
    private String preEntryNo;

    /** 报关类型（export-出口，import-进口） */
    @Excel(name = "报关类型", readConverterExp = "export=出口,import=进口")
    private String declarationType;

    /** 贸易方式（general-一般贸易，processing-加工贸易，bonded-保税） */
    @Excel(name = "贸易方式", readConverterExp = "general=一般贸易,processing=加工贸易,bonded=保税")
    private String tradeMode;

    /** 运输方式（sea-海运，air-空运，land-陆运，express-快递） */
    @Excel(name = "运输方式", readConverterExp = "sea=海运,air=空运,land=陆运,express=快递")
    private String transportMode;

    /** 启运港 */
    @Excel(name = "启运港")
    private String departurePort;

    /** 目的港 */
    @Excel(name = "目的港")
    private String destinationPort;

    /** 出口日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出口日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date exportDate;

    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal totalAmount;

    /** 币种 */
    @Excel(name = "币种")
    private String currency;

    /** 总重量(KG) */
    @Excel(name = "总重量", suffix = "KG")
    private BigDecimal totalWeight;

    /** 总件数 */
    @Excel(name = "总件数")
    private Long totalPackages;

    /** 报关状态（draft-草稿，submitted-已提交，approved-已审批，rejected-已拒绝，cleared-已通关） */
    @Excel(name = "报关状态", readConverterExp = "draft=草稿,submitted=已提交,approved=已审批,rejected=已拒绝,cleared=已通关")
    private String customsStatus;

    /** 提交日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "提交日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date submitDate;

    /** 报关员 */
    @Excel(name = "报关员")
    private String customsOfficer;

    /** 海关编码 */
    @Excel(name = "海关编码")
    private String customsCode;

    /** 收货人名称 */
    @Excel(name = "收货人名称")
    private String consigneeName;

    private String delFlag;

    /** 报关单订单关联信息 */
    private List<FiscaleCustomsDeclarationOrder> declarationOrderList;

    /** 报关单商品明细信息 */
    private List<FiscaleCustomsDeclarationItem> declarationItemList;

    public void setDeclarationId(Long declarationId)
    {
        this.declarationId = declarationId;
    }

    public Long getDeclarationId()
    {
        return declarationId;
    }
    public void setDeclarationNo(String declarationNo)
    {
        this.declarationNo = declarationNo;
    }

    public String getDeclarationNo()
    {
        return declarationNo;
    }
    public void setPreEntryNo(String preEntryNo)
    {
        this.preEntryNo = preEntryNo;
    }

    public String getPreEntryNo()
    {
        return preEntryNo;
    }
    public void setDeclarationType(String declarationType)
    {
        this.declarationType = declarationType;
    }

    public String getDeclarationType()
    {
        return declarationType;
    }
    public void setTradeMode(String tradeMode)
    {
        this.tradeMode = tradeMode;
    }

    public String getTradeMode()
    {
        return tradeMode;
    }
    public void setTransportMode(String transportMode)
    {
        this.transportMode = transportMode;
    }

    public String getTransportMode()
    {
        return transportMode;
    }
    public void setDeparturePort(String departurePort)
    {
        this.departurePort = departurePort;
    }

    public String getDeparturePort()
    {
        return departurePort;
    }
    public void setDestinationPort(String destinationPort)
    {
        this.destinationPort = destinationPort;
    }

    public String getDestinationPort()
    {
        return destinationPort;
    }
    public void setExportDate(Date exportDate)
    {
        this.exportDate = exportDate;
    }

    public Date getExportDate()
    {
        return exportDate;
    }
    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }
    public void setCurrency(String currency)
    {
        this.currency = currency;
    }

    public String getCurrency()
    {
        return currency;
    }
    public void setTotalWeight(BigDecimal totalWeight)
    {
        this.totalWeight = totalWeight;
    }

    public BigDecimal getTotalWeight()
    {
        return totalWeight;
    }
    public void setTotalPackages(Long totalPackages)
    {
        this.totalPackages = totalPackages;
    }

    public Long getTotalPackages()
    {
        return totalPackages;
    }
    public void setCustomsStatus(String customsStatus)
    {
        this.customsStatus = customsStatus;
    }

    public String getCustomsStatus()
    {
        return customsStatus;
    }
    public void setSubmitDate(Date submitDate)
    {
        this.submitDate = submitDate;
    }

    public Date getSubmitDate()
    {
        return submitDate;
    }
    public void setCustomsOfficer(String customsOfficer)
    {
        this.customsOfficer = customsOfficer;
    }

    public String getCustomsOfficer()
    {
        return customsOfficer;
    }
    public void setCustomsCode(String customsCode)
    {
        this.customsCode = customsCode;
    }

    public String getCustomsCode()
    {
        return customsCode;
    }

    public String getConsigneeName() {
        return consigneeName;
    }

    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public List<FiscaleCustomsDeclarationOrder> getDeclarationOrderList()
    {
        return declarationOrderList;
    }

    public void setDeclarationOrderList(List<FiscaleCustomsDeclarationOrder> declarationOrderList)
    {
        this.declarationOrderList = declarationOrderList;
    }

    public List<FiscaleCustomsDeclarationItem> getDeclarationItemList()
    {
        return declarationItemList;
    }

    public void setDeclarationItemList(List<FiscaleCustomsDeclarationItem> declarationItemList)
    {
        this.declarationItemList = declarationItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("declarationId", getDeclarationId())
            .append("declarationNo", getDeclarationNo())
            .append("preEntryNo", getPreEntryNo())
            .append("declarationType", getDeclarationType())
            .append("tradeMode", getTradeMode())
            .append("transportMode", getTransportMode())
            .append("departurePort", getDeparturePort())
            .append("destinationPort", getDestinationPort())
            .append("exportDate", getExportDate())
            .append("totalAmount", getTotalAmount())
            .append("currency", getCurrency())
            .append("totalWeight", getTotalWeight())
            .append("totalPackages", getTotalPackages())
            .append("customsStatus", getCustomsStatus())
            .append("submitDate", getSubmitDate())
            .append("customsOfficer", getCustomsOfficer())
            .append("customsCode", getCustomsCode())
            .append("consigneeName", getConsigneeName())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .append("declarationOrderList", getDeclarationOrderList())
            .append("declarationItemList", getDeclarationItemList())
            .toString();
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }
}